package org.zsk.cfl.servicetask;

import lombok.extern.slf4j.Slf4j;
import org.flowable.common.engine.api.delegate.Expression;
import org.flowable.engine.delegate.DelegateExecution;
import org.flowable.engine.delegate.JavaDelegate;
import org.springframework.stereotype.Component;

/**
 * <p>
 * </p>
 *
 * @author zsk
 * @date 2020/11/17 上午10:03
 */
@Component("postServiceTask")
@Slf4j
public class PostServiceTask implements JavaDelegate {

    private Expression fieldA;
    private Expression fieldB;
    private Expression fieldC;
    @Override
    public void execute(DelegateExecution delegateExecution) {
        log.debug("服务任务-postServiceTask");
        log.debug("服务任务： 流程实例id-{}",delegateExecution.getProcessInstanceId());
        log.debug("服务任务字段： fieldA-{}-{}",fieldA.getExpressionText(),fieldA.getValue(delegateExecution));
        log.debug("服务任务字段： fieldB-{}-{}",fieldB.getExpressionText(),fieldB.getValue(delegateExecution));
        log.debug("服务任务字段： fieldC-{}-{}",fieldC.getExpressionText(),fieldC.getValue(delegateExecution));
    }
}
